package action;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import bean.LoginForm;

import struts3.action.Action;
import struts3.form.ActionForm;

public class LoginAction implements Action {

	public String execute(HttpServletRequest arg0, ActionForm form,
			Map<String, String> map) {
		String url = "error";
		LoginForm loginForm = (LoginForm) form;
		
		if((loginForm.getName().equals("wangfeng")) && (loginForm.getPassword().equals("1234"))){
			url = "success";
		}
		
		return map.get(url);
	}

}
